class Student(object):
    def __init__(self, name, gender):
        self.__name = name
        self.__gender = gender

    def get_name(self):
        print(self.__name)

    def get_gender(self):
        print(self.__gender)

    def set_name(self, name):
        self.__name = name


student1 = Student("xiaowang", "man")

# 强制访问
# print(student1._Student__name)

student1.get_name()
student1.get_gender()